/**
 * This file is released under the GNU General Public License.
 * Refer to the COPYING file distributed with this package.
 *
 * Copyright (c) 2008-2009 WURFL-Pro srl
 */
package net.sourceforge.wurfl.core.resource;

import org.apache.commons.lang.text.StrBuilder;

/**
 * Inexistent group exception.
 * 
 * <p>
 * This Exception is thrown when a {@link ModelDevice} define a group not
 * defined by <code>generic</code>.
 * </p>
 * 
 * @author WURFL-PRO SRL, Rome, Italy
 * @version $Id: InexistentGroupException.java 1045 2009-03-09 15:52:53Z filippo.deluca $
 */
public class InexistentGroupException extends GroupConsistencyException {

	/** serial */
	private static final long serialVersionUID = 10L;

	/**
	 * Build the Exception from {@link ModelDevice} definig the group and the
	 * object group.
	 * 
	 * @param device
	 *            A {@link ModelDevice} defining the group.
	 * @param group
	 *            The group object of this Exception.
	 */
	public InexistentGroupException(ModelDevice device, String group) {
		super(device, group, new StrBuilder("Device: ").append(device.getID()).append(
		" define unknow group: ").append(group).toString());
	}

}
